// 动漫类型定义 - 基于API文档
interface BaseAnime {
  id: number;
  title: string;
  description: string;
  releaseDate: string;
  originalTitle: string;
  coverImageUrl: string;
}

// 扩展动漫接口，包含前端需要的额外字段
export interface Anime extends BaseAnime {
  rating?: number;
  votes?: number;
  favorites?: number;
  synopsis?: string;
  year?: number;
  season?: string;
  genre?: string;
  director?: string;
  studio?: string;
  episodes?: number;
  tags?: string;
  doubanId?: string;
  createdAt?: string;
  type?: string;
  isFavorite?: boolean;
}

// 统一响应格式类型
export interface ApiResponse<T = any> {
  code: number;
  msg: string;
  data: T;
}

// 用户类型定义 - 根据后端API文档调整
export interface User {
  id: number;
  username: string;
  createdAt: string;
  lastLogin: string;
  email?: string;
  avatar?: string;
}

// 投票记录类型定义
export interface VoteRecord {
  userId: string;
  animeId: string;
  timestamp: string;
}

// 提名记录类型定义 - 基于API文档
export interface NominationRecord {
  id: number;
  userId: number;
  animeId: number;
  nominatedAt: string;
}

// 排行榜条目类型
export interface RankingItem {
  rank: number;
  anime: Anime;
  voteCount: number;
}

// 用户活动记录类型定义
export interface UserActivity {
  id: number;
  userId: number;
  activityType: string;
  activityContent: string;
  activityTime: string;
}